package com.atguigu.gmall.order.client;

import com.atguigu.gmall.model.order.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("service-order")
public interface OrderFeignClient {

    //生成交易号
    @GetMapping("/api/order/auth/tradeNo")
    public String tradeNo();

    //对外暴露订单对象
    @GetMapping("/api/order/getOrderInfo/{orderId}")
    public OrderInfo getOrderInfo(@PathVariable(name = "orderId") Long orderId);
}
